import AITalk from '../talkTemplate';
import { GetChangedNextStepMethod } from './defination';
const node = AITalk.getTalks('silentWating');
/**
 * 获取下一步变更的数据
 * @param { Object } preNext 初始的下一步数据 {yes: ''}
 * @param { Object } curNext 当前的下一步数据  {yes: ''}
 */
export const getChangedNextStep = (preNext = {}, curNext = {}) => {
	let changedNextSteps = [];
	if (!preNext && !curNext) {
		return [];
	}

	if (preNext['yes'] !== curNext['yes']) {
		changedNextSteps.push({
			text: '',
			type: node.do.type,
			previous: preNext['yes'],
			current: curNext['yes']
		});
	}

	return changedNextSteps;
};
GetChangedNextStepMethod['silentWating'] = getChangedNextStep;
